﻿using HomeWork.MODEL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork.IBLL
{
    public interface IManBLL
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="man"></param>
        /// <returns></returns>
        Task<int> AddMan(ManInfo man);
        /// <summary>
        /// 员工列表
        /// </summary>
        /// <param name="TotalCount">总行数</param>
        /// <param name="TotalPage">总页数</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页容量</param>
        /// <param name="ManName">员工名称</param>
        /// <param name="ManType">员工类型</param>
        /// <returns>符合条件的数据</returns>
        IQueryable<ManInfo> GetManlist(out int TotalCount,out int TotalPage,int PageIndex=1,int PageSize=1,string? ManName=null,string? ManType=null);
        /// <summary>
        /// 删除员工
        /// </summary>
        /// <param name="ManId">员工ID</param>
        /// <returns>受影响的行数</returns>
        Task<int> DelMan(int ManId);
        /// <summary>
        /// 反填员工
        /// </summary>
        /// <param name="ManId">员工ID</param>
        /// <returns>符合条件的数据</returns>
        Task<ManInfo> FindMan(int ManId);
        /// <summary>
        /// 修改员工
        /// </summary>
        /// <param name="man">实体</param>
        /// <returns>受影响的行数</returns>
        Task<int> UpdateMan(ManInfo man);
    }
}
